<?php
declare (strict_types=1);

namespace app\admin\validate;

use think\Validate;

class PowerValidate extends Validate
{
    /**
     * 定义验证规则
     * 格式：'字段名' =>  ['规则1','规则2'...]
     *
     * @var array
     */
    protected $rule = [
        'title|权限标题'       => 'require|max:15',
        'name|权限名称'        => 'max:40',
        'node_icon|权限图标'   => 'max:20',
        'type|权限类型'        => 'require|in:1,2',
        'routing|路由'       => 'max:30',
        'pid|父级ID'         => 'integer',
        'status|权限状态'      => 'require|in:1,2',
        'description|权限摘要' => 'max:200',
        'sort|权限排序'        => 'integer|between:0,10000',
    ];

}
